package com.hs.readledkx;


import com.hs.readledkx.tutorial.BxClientDemo;
import com.hs.readledkx.tutorial.client.WriteProgramTextCaption;
import com.hs.readledkx.tutorial.client.WriteProgramTextCaption2;
import com.hs.readledkx.tutorial.client.WriteProgramTextCaptionWithStyle;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import uia.utils.StringUtils;

@RestController
@RequestMapping("/test")
public class TestController {

    @RequestMapping("/send1")
    public String test1(String ip,String content,int x,int y,int w,int h,int fs) throws Exception {
        if(null == content || content.trim().length() == 0 ){
            content ="2025/09/26 11:12:58\n"
                    +"\n"
                    +" 炉   加料数     加料量     出炉数  出铁量   \n"
                    +" 1    15         500       15    3000     \n"
                    +" 2    15         500       15    3000     \n"
                    +" 3    15         500       15    3000     \n"
                    +" 4    15         500       15    3000     \n"
                    + "炉   出铁温度      CE     C     Si        \n"
                    +"\n"
                    + "1    1500       0.63   0.26  0.012      \n"
                    + "2    1500       0.63   0.26  0.012      \n"
                    + "3    1500       0.63   0.26  0.012      \n"
                    + "4    1500       0.63   0.26  0.012      \n";
        }
        if(ip == null || ip.trim().length() == 0){
            ip = "192.168.200.16";
        }
        WriteProgramTextCaption.send(ip,5005,content,x,y,w,h,fs);
        return content;
    }

}
